Skip to content

[Sema] Sink Pattern invalidation into SyntacticElementTarget::markInvalid #83633

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 11, 2025

Conversation

hamishknight
Copy link
Contributor

Rather than handling this in the callers of typeCheckExpression, handle it in the constraint system's invalidation logic. This also ensures we set a type for sub-pattern nodes.

I don't think this currently affects anything, but match what we do
for the expression and update the pattern if type-checking the
initialization fails.
…valid`

Rather than handling this in the callers of `typeCheckExpression`,
handle it in the constraint system's invalidation logic. This also
ensures we set a type for sub-pattern nodes.
I don't recall why I made this conditional, let's just be consistent
and always set ErrorType for invalid AST. This should only affect
things like implicit nodes.
@hamishknight
Copy link
Contributor Author

@swift-ci please test

@hamishknight hamishknight merged commit 0eca304 into swiftlang:main Aug 11, 2025
5 checks passed
@hamishknight hamishknight deleted the pat-pat branch August 11, 2025 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants